using Business.BrandManagement;
using Business.BrandManagement.Dto;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;

namespace Business.Controllers
{
    [RemoteService]
    [Area("Business")]
    [Route("api/business/Brand")]
    public class BrandController : AbpController
    {
        private readonly IBrandAppService _BrandAppService;

        public BrandController(IBrandAppService BrandAppService)
        {
            _BrandAppService = BrandAppService;
        }

        [HttpPost]
        [Route("data-post")]
        public Task<BrandDto> DataPost(CreateOrUpdateBrandDto input)
        {
            return _BrandAppService.DataPost(input);
        }

        [HttpPost]
        [Route("delete")]
        public Task Delete(List<Guid> ids)
        {
            return _BrandAppService.Delete(ids);
        }

        [HttpGet]
        [Route("{id}")]
        public Task<BrandDto> Get(Guid id)
        {
            return _BrandAppService.Get(id);
        }

        [HttpGet]
        public Task<PagedResultDto<BrandDto>> GetAll(GetBrandInputDto input)
        {
            return _BrandAppService.GetAll(input);
        }
    }
}
